const tick = Date.now();

const log = (x) => console.log(`${x} \n Time:${Date.now() - tick}`);

const codeBlocker = () => {
  return new Promise((resolve, reject) => {
    let i = 0;
    while (i < 100000000) {
      i++;
    }//已经在主线程执行
    resolve("🍋loops done")
  });
};

log("🍅async1");
codeBlocker().then(log);
log("🍅async2");//打印出来的时候仍然会有延迟
